package com.the.ui.data.bindadapter

import androidx.databinding.BindingAdapter
import com.the.ui.widge.ColorTrackTextView


object CustomBindAdapter {

    @BindingAdapter(value = ["progress","direction"],requireAll = false)
    @JvmStatic
    fun colorTrackTextView(
        textView: ColorTrackTextView,
        progress: Float,
        direction: ColorTrackTextView.Direction? = null
    ) {

        with(textView){
            mCurrentProgress = progress
            direction?.let {
                mDirection = it
            }
        }
    }

}